//
// Created by Yun on 2025/2/26.
//

#ifndef FRMAEWORK_DEMO_GPIO_DEV_TIM_H
#define FRMAEWORK_DEMO_GPIO_DEV_TIM_H

#include "dev_common_type.h"
#include "tim_interface.h"


typedef struct Dev_Tim_Cfg {
    void* pHwCfg;
    Tim_Interface_TypeDef* pstDevTimInterface;
    struct Dev_Tim_Cfg* pstNext;
    uint8_t u8Timeout;
    uint8_t u8CurTick;
    uint8_t u8InitState:1;                       /*!< 初始状态 */
    uint8_t u8RunState:1;                            /*!< 运行状态 */
    uint8_t u8LockState:1;                          /*!< 锁定状态 */
}Dev_Tim_Cfg_TypeDef;

uint8_t Dev_Tim_Register(Dev_Tim_Cfg_TypeDef* pstConfig,
                          void* pHwCfg,
                          Tim_Interface_TypeDef* pstDevTimInterface);

uint8_t Dev_Tim_En(Dev_Tim_Cfg_TypeDef* pstConfig,
                    uint8_t u8State);


#endif //FRMAEWORK_DEMO_GPIO_DEV_TIM_H
